#python3
#!/usr/bin/env python3
#coding:utf-8
def tst():
    status_200= []
    status_404= []
    with open("access_json.log") as f:
        for line in f.readlines():
            line = eval(line)
                if line.get("status") == "200":
                    status_200.append(line.get)
                elif line.get("status") == "404":
                    status_404.append(line.get)
                else:
                    print("状态码 ERROR")
                    print((line.get("clientip")))
    f.close()
    print("状态码200的有--:",len(status_200))
    print("状态码404的有--:",len(status_404))
    
  
tst()